﻿CREATE TABLE [dbo].[UDS_Flow_Member_Bind] (
    [Flow_ID]  int NOT NULL,
    [Step_ID]  int NOT NULL,
    [Obj_ID]   int NOT NULL,
    [Obj_Type] int NOT NULL, /* 1: position; 2: team; 3: role; 4: staff; */
    
    CONSTRAINT [PK_UDS_Flow_Member_Bind] PRIMARY KEY CLUSTERED (Flow_ID asc, Step_ID asc, Obj_ID asc, Obj_Type asc),
    CONSTRAINT [FK_UDS_Flow_Member_Bind_FlowStep_ID] FOREIGN KEY (Flow_ID, Step_ID) REFERENCES dbo.UDS_Flow_Step(Flow_ID, Step_ID) ON DELETE CASCADE
);
GO
